package com.lst.tools.basics.utils;

import org.apache.commons.io.IOUtils;

import java.io.Closeable;
import java.io.IOException;

/**
 * @author: Frank
 * @date: 2019/09/24 13:51
 * @version: V1.0
 */
public class IoUtils extends IOUtils {

    /**
     * 关闭流
     *
     * @return
     */
    public static void close(Closeable... closeables) {
        if (closeables.length == 0) {
            return;
        }
        for (Closeable closeable : closeables) {
            try {
                if (closeable != null) {
                    closeable.close();
                }
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }
}
